/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.suli.rollDetail.domain;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.sql.Timestamp;
import java.math.BigDecimal;
import java.io.Serializable;

/**
* @website https://eladmin.vip
* @description /
* @author WYH
* @date 2024-03-14
**/
@Entity
@Data
@Table(name="roll_detail")
public class RollDetail implements Serializable {

    @Id
    @Column(name = "`id`")
    @ApiModelProperty(value = "id")
    private String id;

    @Column(name = "`main_id`")
    @ApiModelProperty(value = "主表id")
    private String mainId;

    @Column(name = "`el_no`")
    @ApiModelProperty(value = "物料编号")
    private String elNo;

    @Column(name = "`el_name`")
    @ApiModelProperty(value = "物料名称")
    private String elName;

    @Column(name = "`mr_qty`")
    @ApiModelProperty(value = "数量")
    private BigDecimal mrQty;

    @Column(name = "`lot_no`")
    @ApiModelProperty(value = "批次号")
    private String lotNo;

    @Column(name = "`create_time`")
    @ApiModelProperty(value = "创建时间")
    private Timestamp createTime;

    @Column(name = "`status`")
    @ApiModelProperty(value = "状态")
    private String status;

    @Column(name = "`from_wano`")
    @ApiModelProperty(value = "从库区")
    private String fromWaNo;

    @Column(name = "`to_wano`")
    @ApiModelProperty(value = "至库区")
    private String toWaNo;

    @Column(name = "`vmi_code`")
    @ApiModelProperty(value = "vmi状态")
    private String vmiCode;

    @Column(name = "`el_unit`")
    @ApiModelProperty(value = "单位")
    private String elUnit;

    @Column(name = "`pk_list`")
    @ApiModelProperty(value = "箱号")
    private String pkList;

    @Column(name = "`su_no`")
    @ApiModelProperty(value = "供应商")
    private String suNo;
    public void copy(RollDetail source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
